package com.koocloud.electroplatemanage.mapper;

import com.koocloud.electroplatemanage.pojo.CodeNameResult;
import com.koocloud.electroplatemanage.pojo.IncomePartUnitVo;
import com.koocloud.electroplatemanage.pojo.PersonVo;
import com.koocloud.electroplatemanage.pojo.WorkTimeVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @program: electroplatemanage
 * @description: 来件单位Mapper接口
 * @author: zww
 * @create: 2020-10-08 17:29
 */
@Mapper
public interface IncomePartUnitMapper {
    //通过pk查询一条记录 delete_flag = "1"
    IncomePartUnitVo selectByPk(String pkIncomePartUnit);
    //通过 cn_name查询一条记录
    IncomePartUnitVo selectByCnName(String cnName);
    //通过code查询一条记录 delete_flag = "0"
    IncomePartUnitVo selectByCode(String incomepartunitCode);

    //查询所有记录
    List<IncomePartUnitVo> selectAllData(IncomePartUnitVo incomePartUnitVo);
    //根据状态进行模糊查询 启用为1 禁用为0
    List<IncomePartUnitVo> selectByDeleteFlag(IncomePartUnitVo incomePartUnitVo);
    //插入一条记录
    int insert(IncomePartUnitVo incomePartUnitVo);
    //批量插入记录
    int batchInsert(List<IncomePartUnitVo> listIncomePartUnitVo);
    //逻辑删除一条记录
    int delete(@Param("incomepartunitCode") String incomepartunitCode, @Param("deleteFlag") String deleteFlag);
    //通过pks批量逻辑删除记录
    int batchDeleteByPks(List listPks);
    //修改一条记录
    int update(IncomePartUnitVo incomePartUnitVo);
    //修改一条记录 updateFlag  delete_flag
    int updateFlag(IncomePartUnitVo incomePartUnitVo);
    //查询来件单位对应编码和名称
    List<CodeNameResult> selectUnit(String idOrName);
    //查询来件单位总数
    int selectAmount();
}
